<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
</head>

<body>
  <div id="app">
    <!-- <template v-if="a==='a'">
      <h1 >a</h1>
    </template>

    <template v-else-if="a==='b'" >
      <h2>b</h2>
    </template>

    <template v-else >
      <h2>c</h2>
    </template> -->

    <!-- <template v-if="loginType === 'username'">
      <label>Username</label>
      <input key="username" placeholder="Enter your username">
    </template>
    <template v-else>
      <label>Email</label>
      <input key="email" placeholder="Enter your email address">
    </template>

    <button @click="handleChange()">change</button> -->

    <!-- <h1 v-show="isshow">太原2002</h1> -->
    <ul>
      <li v-for="n in num" v-if="n%2===0">
        {{n}}
      </li>
    </ul>

  </div>

  <script>
    var vm = new Vue({
      el: "#app",
      data: {
        isshow: true,
        a: 'a',
        loginType: "",
        num: [1, 2, 3, 4, 5]
      },
      methods: {
        handleChange() {
          if (this.loginType === 'username') {
            this.loginType = "email"
          } else {
            this.loginType = "username"
          }
        }
      }
    })
  </script>
</body>

</html>